# $Id: PKGBUILD 183419 2013-04-21 22:10:59Z heftig $
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: György Balló <ballogy@freestart.hu>

pkgname=gupnp
pkgver=0.20.2
pkgrel=1
pkgdesc="An object-oriented UPNP framework"
arch=(i686 x86_64)
url="http://gupnp.org/"
license=(LGPL)
depends=(gssdp util-linux)
makedepends=(gobject-introspection gtk-doc vala) 
optdepends=('python2: gupnp-binding-tool')
options=('!libtool')
source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz)
sha256sums=('9b27b1bdd16f7f13e28e20bce85a117e577a8183f95615876a9d91f4d4a70812')

build() {
  cd $pkgname-$pkgver
  sed -i '1s|^#!.*python$|&2|' tools/gupnp-binding-tool
  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
              --disable-static --with-context-manager=linux
  make
}

check() {
  cd $pkgname-$pkgver
  make check
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
}
